package com.kobe.demo.repository;

import com.kobe.demo.entity.RoleEntity;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import javax.persistence.EntityManager;
import javax.persistence.Query;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * 创建 JYQ  on  2018/11/1,9:37
 */
@Repository
public class RoleInfoRepositoryImpl {
    @Resource
    private EntityManager entityManager;
    public List<?> queryList(){
        String sql="select * from role_info";
        Query query = entityManager.createNativeQuery(sql, RoleEntity.class);
        List resultList = query.getResultList();
        return resultList;
    }

}
